window.onload=function(){
    let div_child = document.getElementById("div_child")
    let div_parent = document.getElementById("div_parent")
    div_child.addEventListener("click", (event) => {
        event.stopPropagation() //停止传输
        console.log("div_child被点击")
    })
    div_parent.addEventListener("click", () => {
        console.log("div_parent被点击")
    }, true) //捕获
    document.getElementsByTagName("div")[2].addEventListener("click", (event) => {
        console.log(event.target.innerHTML)
        event.target.remove() //点击之后被删除
    })
    document.getElementsByTagName("a")[0].addEventListener("click", (event) => {
        event.preventDefault() //阻止默认的反应
    })
    console.log(document.documentElement)
    console.log(document.body)
    window.alert("看")
    let username=document.getElementById("username")
    console.log(username.value)//获取输入的值
}